package com.smile.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.smile.mapper.FlightLogMapper;
import com.smile.model.domain.FeisuanFlightLog;
import com.smile.model.dto.request.FlightLogRequestDTO;
import com.smile.service.FlightLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FlightLogServiceImpl implements FlightLogService {

    @Autowired
    private FlightLogMapper flightLogMapper;
    @Override
    public void addFlightLog(FlightLogRequestDTO flightLogRequestDTO) {
        FeisuanFlightLog feisuanFlightLog = BeanUtil.copyProperties(flightLogRequestDTO, FeisuanFlightLog.class);
        flightLogMapper.insert(feisuanFlightLog);
    }
}
